package work.huangxin.share.domain.wx;

import lombok.Getter;
import lombok.Setter;
import lombok.ToString;

/**
 * @author 季台星
 * @Date 2023 04 02 12 15
 * 单例模式GPT请求对象
 */
@Getter
@Setter
@ToString
public class ChatGPTRequestSignalTon {
    private String model;
    private String prompt;
    private Integer max_tokens;
    private float temperature;
    private Integer top_p;
    private Integer n;
    private Boolean stream = false;
    private Boolean logprobs;
    private String stop;
    private Messages[] messages;

    private static ChatGPTRequestSignalTon chatGPTRequestSignalTon;

    static{
        chatGPTRequestSignalTon = new ChatGPTRequestSignalTon();
        chatGPTRequestSignalTon.setModel("gpt-3.5-turbo-0301");
        chatGPTRequestSignalTon.setMax_tokens(3000);
        chatGPTRequestSignalTon.setTemperature(0);
    }

    public ChatGPTRequestSignalTon() {
    }

    /**
     * 饿汉式返回单例对象
     * @return
     */
    public static ChatGPTRequestSignalTon getInstance(){
        return chatGPTRequestSignalTon;
    }

    /**
     * 私有化构造器
     * @param model
     * @param prompt
     * @param max_tokens
     * @param temperature
     * @param top_p
     * @param n
     * @param stream
     * @param logprobs
     * @param stop
     * @param messages
     */

    private ChatGPTRequestSignalTon(String model, String prompt, Integer max_tokens, float temperature, Integer top_p, Integer n, Boolean stream, Boolean logprobs, String stop, Messages[] messages) {
        this.model = model;
        this.prompt = prompt;
        this.max_tokens = max_tokens;
        this.temperature = temperature;
        this.top_p = top_p;
        this.n = n;
        this.stream = stream;
        this.logprobs = logprobs;
        this.stop = stop;
        this.messages = messages;
    }
}
